{% extends "main/base.html" %}
{% load i18n main_tag %}
{% block title %}{% trans '服务记录详情' %}{% endblock %}
{% block content %}
<div class="container-fluid">
    <div class="panel panel-profile">
        <div class="clearfix">
            <!-- LEFT COLUMN -->
            <div class="profile-left">
                <!-- PROFILE HEADER -->
                <div class="profile-header">
                    <div class="overlay"></div>
                    <div class="profile-main">
                        <h3 class="name">{{ object.related_order.order_code }}</h3>
                    </div>
                    <div class="profile-stat">
                        <div class="row">
                            <div class="col-md-4 stat-item">
                                {% trans '保修开始日期' %}
                            </div>
                            <div class="col-md-8 stat-item">
                                {{ object.related_order.order_install_finish_date }}
                            </div>
                        </div>
                    </div>
                </div>
                <!-- END PROFILE HEADER -->
                <!-- PROFILE DETAIL -->
                <div class="profile-detail">
                    <div class="profile-info" style="min-height:225px;">
                        <h4 class="heading">{% trans '订单信息' %}</h4>
                        <ul class="list-unstyled list-justify">
                            <li>{% trans '订单描述:' %}<span>{{ object.related_order.order_desc }}</span></li>
                            <li>{% trans '客户:' %}<span>{{ object.related_order.client.company }}</span></li>
                            <li>{% trans '联系人:' %}<span>{{ object.related_order.client.name }}</span></li>
                            <li>{% trans '联系方式:' %}<span>{{ object.related_order.client.mobile }}</span></li>
                            <li>{% trans '地址:' %}<span>{{ object.related_order.client.company_address }}</span></li>
                        </ul>
                    </div>
                    <!--<div class="profile-info">-->
                        <!--<h4 class="heading">About</h4>-->
                        <!--<p>Interactively fashion excellent information after distinctive outsourcing.</p>-->
                    <!--</div>-->
                    <!--<div class="text-center"><a href="#" class="btn btn-primary">{% trans '编辑资料' %}</a></div>-->
                </div>
                <!-- END PROFILE DETAIL -->
            </div>
            <!-- END LEFT COLUMN -->
            <!-- RIGHT COLUMN -->
            <div class="profile-right">
                <h4 class="heading">{{ object.title|default_if_none:'N/A' }}</h4>
                <!-- TABBED CONTENT -->
                <div class="custom-tabs-line tabs-line-bottom left-aligned">
                    <ul class="nav" role="tablist">
                        <li class="active"><a href="#tab-bottom-left1" role="tab" data-toggle="tab" aria-expanded="false">{% trans '备注' %}</a></li>
                    </ul>
                </div>
                <div class="tab-content">
                    <div class="tab-pane fade active in" id="tab-bottom-left1" >
                        <div style="min-height:250px;">
                            {{ object.remarks|default_if_none:'N/A'|linebreaks }}
                        </div>
                    </div>
                    <div class="text-right">
                    {% if perms.main.change_servicerecord %}
                        <a class="btn btn-danger" href="{% url 'main:service_record_update' object.pk %}">{% trans "编辑" %}</a>{% endif %}
                    <a class="btn btn-primary" href="{% url 'main:service_records_list_c' 1 %}">{% trans "返回" %}</a></div>
                </div>
                <!-- END TABBED CONTENT -->
            </div>
            <!-- END RIGHT COLUMN -->
        </div>
    </div>
</div>
{% endblock %}

